package com.bubblegumproject.ogo.remote.http;

import com.bubblegumproject.ogo.remote.RemoteClient;
import com.sun.net.httpserver.HttpExchange;

import java.io.OutputStream;

/**
 * @author Azubuko Obele (buko.obele@gmail.com)
 */
public class HttpRemoteClient implements RemoteClient {

    private HttpExchange httpExchange;

    HttpRemoteClient(HttpExchange exchange) {
        if (exchange == null) throw new IllegalArgumentException("null");
        this.httpExchange = exchange;
    }

    public HttpExchange getHttpExchange() {
        return httpExchange;
    }


    public OutputStream getResponseOutputStream() {
        return httpExchange.getResponseBody();
    }
}
